package com.oracleoaec.service;

import java.util.List;

import com.oracleoaec.dao.AdminDao;
import com.oracleoaec.dao.impl.AdminDaoImpl;
import com.oracleoaec.entity.Car;
import com.oracleoaec.entity.Record;

public class AdminServiceImpl implements AdminService{
	private AdminDao adminDao;
	public AdminServiceImpl() {
		adminDao=new AdminDaoImpl();
	}
	@Override
	public boolean addCar(Car car) {
		return adminDao.addCar(car);
	}
	@Override
	public String isExistCarNumber(String name) {
		return adminDao.isExistCarNumber(name);
	}
	@Override
	public List<Record> queryAllRecord(String type) {
		
		return adminDao.queryAllRecord(type);
	}
	@Override
	public Car queryCarById(long id) {
		return adminDao.queryCarById(id);
	}
	@Override
	public Car updateCarInfo(long carId, double price) {
		
		return adminDao.updateCarInfo(carId, price);
	}
	@Override
	public Car updateCarUseable(long carId, int useable) {
		
		return adminDao.updateCarUseable(carId, useable);
	}
}
